package zwz.importTask.utils;

import lombok.Data;
import zwz.importTask.pojo.BiDataImportTaskPO;

import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.atomic.AtomicInteger;

@Data
public class ImportContext<T> {
    // 总成功数
    private final AtomicInteger totalSuccessCount = new AtomicInteger(0);
    // 总失败数
    private final AtomicInteger totalFailureCount = new AtomicInteger(0);
    // 实际总行数
    private final AtomicInteger totalCount = new AtomicInteger(0);
    // 批次数据
    private List<T> batchList = new ArrayList<>();
    // 批次成功的数据
    private List<T> successList = new ArrayList<>();
    // 批次失败的数据
    private List<T> failureList = new ArrayList<>();
    // 所有失败的数据
    private List<T> totalFailureList = new ArrayList<>();
    // 文件类型
    private Integer fileType;
    // 粗略总行数
    private Integer totalRecords = 0;
    // 文件名字
    private String fileName;
    // 导入明细对象
    private BiDataImportTaskPO biDataImportTaskPO;
    private String originFileUrl;
    private String errorFileUrl;
}
